package com.qijian.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

@Getter
@AllArgsConstructor
public enum TapPermissionEnum {

    eqp("business:eqpLedger:list", "设备台账tab"),
    frock("business:frockLedger:list", "工装台账tab"),
    knife("business:knifeLedger:list", "刀具台账tab"),
    workshop("business:workshopLedger:list", "车间仓库台账tab"),
    gauge("business:ledgerGauge:list", "量具台账tab"),
    tools("business:ledgerTools:list", "工具台账tab");

    String perm;

    String value;

    public static Map<String, String> getAll() {
        return Arrays.stream(TapPermissionEnum.values()).collect(Collectors.toMap(item -> item.getPerm(), item -> item.getValue()));
    }


}
